<!--autoSearch dataList-->
<?php if($viewType=='getPartsList'):?>
<ul>
    <?php foreach ($partsList as $key=>$rs):?>
    <li class="partsLi"  onclick="addParts_two('<?=$rs['jsonData']?>',1)">
        <a href="javascript:void(0)"><?=$rs['name']?>&nbsp;&nbsp;<?=$rs['sku']?></a>
    </li>
    <?php endforeach;?>
</ul>
<!--partsList dataList-->
<?php elseif($viewType=='partsList' && $partsList):?>
    <p><span><?=lang('peijian_pjlb')?></span></p>
    <table class="c_c_tables tbwd800" cellspacing="0">
        <thead>
        <tr>
            <th width="5%">id</th>
            <th><?=lang('peijian_pjmc')?></th>
            <th>sku</th>
            <th><?=lang('peijian_sl')?></th>
            <th><?=lang('peijian_sj')?></th>
            <th><?=lang('peijian_bj')?></th>
            <th><?=lang('order_zt')?></th>
            <th><?=lang('order_rq')?></th>
            <th><?=lang('order_clr')?></th>
            <th><?=lang('peijian_ckdm')?></th>
            <th width="10%">Modify</th>
        </tr>
        </thead>
        <?php if($show_pages):?>
            <tfoot>
            <tr><th colspan="11" height="45"><?=$show_pages?> </th></tr>
            </tfoot>
        <?php endif;?>
        <tbody>
        <?php foreach ($partsList as $key=>$rs):?>
            <tr align="center" style="color:<?=$rs['able_write_off']=='Y'?'#ff0000':''?>">
                <td width="5%"><?=$rs['id']?></td>
                <td width="20%" title="<?=$rs['name']?>"><?=$rs['nameSub']?></td>
                <td width="10%"><?=$rs['sku']?></td>
                <td width="5%"><?=$rs['quantity']?></td>
                <td width="10%"><?=$rs['price']?></td>
                <td width="10%"><?=$rs['rate_price']?></td>
                <td width="10%"><?=$rs['statusName']?></td>
                <td width="10%"><?=date('y-m-d H:i',$rs['add_time'])?></td>
                <td width="10%"><?=$rs['add_user']?></td>
                <td width="10%"><?=$rs['whs_code']?></td>
                <td width="10%">
                    <?php if($orderFirst['is_pay']):?>
                        No Modify
                    <?php else:?>
                        <a href="javascript:;" onclick="delPart('<?=$rs['id']?>')"><?=lang('public_sc')?></a>
                    <?php endif;?>
                </td>
            </tr>
        <?php endforeach;?>
        </tbody>
    </table>
    <script type="text/javascript">
        function delPart(id) {
            var isdel = confirm('<?=lang('public_isdel')?>');
            if(!isdel)return false;
            $.post("<?=blang_url('common/Com_ajax/delParts')?>",{id:id},function(data){
                    $('#partsListId').html(data);
                }
            );
        }
    </script>
<?php endif;?>
